#!/usr/bin/env bash


ip=""
domain=""


while [ $# -gt 0 ]
do
        case "$1" in
                -i)
                        ip=$2
                        shift
                        ;;
                -d)
                        domain=$2
                        shift
                        ;;
                -*)
                        echo "Invalid option: $1"
                        usage
                        exit 2
                        ;;
        esac
        shift
done




req="curl -s -X GET --header 'Accept: application/json' 'http://www.luohao.work/ins/whois?domain=$domain&ip=$ip'"


res=`eval $req`
echo $res

#http://minge.hn.cn/
